package com.example.test01;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentTabHost;

public class HomeFragment extends FragmentActivity {
    private FragmentTabHost mTabHost;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        mTabHost = findViewById(android.R.id.tabhost);
        mTabHost.setup(this,getSupportFragmentManager(),R.id.realtabcontent);
        mTabHost.addTab(mTabHost.newTabSpec("simple").setIndicator("simple"),FragmentA1.class,null);
        mTabHost.addTab(mTabHost.newTabSpec("contacts").setIndicator("Contacts"),FragmentA2.class,null);
    }
}
